#include "Grades.h"
bool Grades::ifValid()
{
	for(int i=0;i<=5;i++)
		if(mark[i]<0 || mark[i]>100)
			return false;
	return true;
}
Grades::Grades(char *name, char *number, char *profession, float mark[])
{
	for(int i=0;i<=5;i++)
		this->mark[i]=mark[i];
	setInfo(name, number, profession);
	refresh();
}
void Grades::setGrade(float mark[])
{
	for(int i=0;i<=5;i++)
	this->mark[i]=mark[i];
	refresh();
}
float Grades::getAverage()
{
	return average;
}